﻿using LJLib.Net.SPI.Com;

namespace PhoneUI.Com
{
    public sealed class GetMD5Request : ILJTokenRequest<GetMD5Response>
    {
        public string token { get; set; }

        /// <summary>
        /// 文件来源
        /// MailAnnex- 邮件附件(Sys_admsg_fj)
        /// OADocAnnex- 公文附件(oa_doc_annex)
        /// OADemoAnnex- 公文模板附件(oa_demo_annex)
        /// OAFlowDefAnnex- 审批流程主模板(oa_flow_annex)
        /// UFile- 单据附件(U_File)
        /// </summary>
        public string type { get; set; }
        /// <summary>
        /// 附件ID
        /// </summary>
        public int id { get; set; }
        /// <summary>
        /// 显示宽度，只对图片文件有较，0则返回原始文件
        /// </summary>
        public int width { get; set; }
        /// <summary>
        /// 显示高度，只对图片文件有较，0则返回原始文件
        /// </summary>
        public int height { get; set; }

        public string GetApiName()
        {
            return "GetMD5";
        }
    }

    public sealed class GetMD5Response : LJResponse
    {
        public string filename { get; set; }
        public string md5 { get; set; }
    }
}